package com.demo.inheritance.animals;

import com.demo.inheritance.LivingBeings;

public class Animal extends LivingBeings {

	private boolean hasTail;
	
	public Animal(int legs, boolean hasTail) {
		
		super(legs);		
		this.hasTail = hasTail;
		
	}
	
	public Animal(){		
		this(4, false);
		System.out.println("This is another constructor");
	}
	
	@Override
	public void speak() {
		super.speak();	
		System.out.println("Yes I am animal and can speak");
	}
	
	
	

}
